package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.ui.TreeItem;

public class DeleteChannelEvent extends GwtEvent<DeleteChannelEventHandler> {

    public static Type<DeleteChannelEventHandler> TYPE = new Type<DeleteChannelEventHandler>();

    private final TreeItem treeItem;

    public DeleteChannelEvent(TreeItem treeItem) {
        this.treeItem = treeItem;
    }

    public TreeItem getTreeItem() {
        return treeItem;
    }

    @Override
    public Type<DeleteChannelEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(DeleteChannelEventHandler handler) {
        handler.onDeleteChannel(this);
    }

}
